#pragma once

// level 4 ( full log )
// level 3 ( debug log )
// level 2 ( critical log )
// level 1 ( must log )
#ifdef _DEBUG
#   define JOY_LOG_LEVEL 3
#else
#   define JOY_LOG_LEVEL 2
#endif

#define JOY_LOG JoySaveLog

#if JOY_LOG_LEVEL >= 4
#   define JOY_LOG4 JoySaveLog
#else
#   define JOY_LOG4 __noop
#endif

#if JOY_LOG_LEVEL >= 3
#   define JOY_LOG3 JoySaveLog
#else
#   define JOY_LOG3 __noop
#endif

#if JOY_LOG_LEVEL >= 2
#   define JOY_LOG2 JoySaveLog
#else
#   define JOY_LOG2 __noop
#endif

#if JOY_LOG_LEVEL >= 1
#   define JOY_LOG1 JoySaveLog
#else
#   define JOY_LOG1 __noop
#endif


void JoySaveLog(const char* path, const char* logText, ...);
void JoySaveLogV(const char* path, const char* logText, va_list args);

//##ModelId=44CF1758009C
class CJoyLogTool
{
protected:
	//##ModelId=44CF1758009D
    const char* m_path;
public:
	//##ModelId=44CF1758009E
    CJoyLogTool(const char* path, const char* srcPath, int nSrcLine):
        m_path(path)
    {
        srcPath;nSrcLine;
    }

	//##ModelId=44CF175800A2
    void operator () (const char* logText, ...);
};
